package homework;

import java.util.ArrayList;
import java.util.Random;

public class Mybox extends Thread{
	String name;
	Money a;
	public Mybox(Money money,String name) {
		this.name=name;
		this.a=money;
	}
	@Override
	public void run() {
		int total=0;
		int count=0;
		while(a.money.size()>=1){
			total+=a.choujiang(name);
			count++;
			try {
				Thread.sleep(10);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}
}